<?php

namespace App\Entities;

use App\Support\Database\Eloquent\UuidModel;

class ActivityModel extends UuidModel
{
    const MODEL_VOTE = 'vote';
    const MODEL_ENROLL = 'enroll';
    const TYPE_NORMAL = 0;
    const TYPE_DRAW = 1;

    protected $fillable = [
        'id', 'name', 'rule',
    ];

    public function activities()
    {
        return $this->hasMany('App\Models\Activity\Activity', 'model_id');
    }

    public function templates()
    {
        return $this->hasMany(ActivityModelTemplate::class, 'model_id');
    }
}